package com.zsj.springboot.rocketmq.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author zhangsj
 * @date 2020/6/1 19:09
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "springboot-rocketmq", consumerGroup = "${rocketmq.consumer.group}")
public class Consumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String msg) {
        log.info("<==== 【接受到消息】【{}】", msg);
    }
}
